package com.lesshassles.util;

import java.beans.PropertyEditorSupport;

import com.lesshassles.model.UserBroker;

public class UserPropertyEditor extends PropertyEditorSupport {
	private UserBroker userBroker;
	
	public UserPropertyEditor(UserBroker userBroker) {
		this.userBroker = userBroker;
	}
	
	@Override
	public void setAsText(String userIdText) {
		int userId = Integer.parseInt(userIdText);
		
		
		setValue(userBroker.getById(userId));
	}
	
}
